/*
 * Copyright (c) 2020 IUV Inc. All rights reserved.
 * 项目名称：IUV TXY
 * 文件名：DemoImUserInfoRepository.java
 * Date：20-10-22 下午3:03
 * Author：Will
 */

package com.iuv.imdemo.repository;

import com.iuv.imdemo.domain.DemoImUserInfo;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * IM例子-用户关联DAO
 */
public interface DemoImUserInfoRepository extends JpaRepository<DemoImUserInfo,Integer> {

    /**
     * 通过用户ID模糊查询
     * @param userId
     * @return
     */
    List<DemoImUserInfo> queryTop20ByUserIdLike(String userId);

    /**
     * 通过用户ID查询用户信息
     * @param userId
     * @return
     */
    DemoImUserInfo findTopByUserId(String userId);
}
